#ifndef PROCEDURE_H
#define PROCEDURE_H

#include "itsaction.h"

namespace IAlib
{

class IA_LIBSHARED_EXPORT Procedure
{
public:
    Procedure();
    Procedure(const Procedure& procedure);

    ~Procedure();

    void setName(const QString& name) { m_name = name; }
    QString getName() const { return m_name; }

    void setEfficiency(const int efficiency) { m_efficiency = efficiency; }
    int getEfficiency() const { return m_efficiency; }

    QList<ItsAction*> getActions() const { return m_actions; }

    ItsAction* getAction(const int index);

    void addAction(const ItsAction& action);
    void removeAction(const QString& id);
	void removeActionAt(const int index);

    QDomElement toXML(QDomDocument &doc);
    void        fromXML(QDomElement ele);

    Procedure& operator=(const Procedure& procedure);

private:
    QString m_name;
    int     m_efficiency;

    QList<ItsAction*> m_actions;
};

}

#endif // PROCEDURE_H
